<?php
declare (strict_types = 1);

namespace app\api\controller\wechat;



use app\api\service\WorkWechatService;
use app\common\service\HttpService;

class Work
{

    public function index()
    {
        $app=WorkWechatService::getApp();
        $app->server->push(function($message){
            // $message['FromUserName'] // 消息来源
            // $message['MsgType'] // 消息类型：event ....
HttpService::logInfo("企业微信消息",$message);
            return 'Hello easywechat.';
        });

        $response = $app->server->serve();

        $response->send();
        die();
    }


    public function test()
    {
        return 'hello';
}


}
